<template>
		<el-container>
			<el-header class="back-header">
				<h1>焦作师专新闻系统</h1>
				<div>
					<el-button  type="text" @click="toIndex()">回到首页</el-button>
				</div>
			</el-header>
			<el-container >
				<el-aside width="200px">
					<el-menu style="height: 100%;" active-text-color="#ffd04b" background-color="#545c64" class="el-menu-vertical-demo"
						default-active="2" text-color="#fff">
						<el-menu-item index="1" @click="showNews()">
							<el-icon><icon-menu /></el-icon>
							<span >新闻管理</span>
						</el-menu-item>
						<el-menu-item index="2" @click="showUser()">
							<el-icon><icon-menu /></el-icon>
							<span >用户管理</span>
						</el-menu-item>
					</el-menu>
				</el-aside>
				<el-main><router-view></router-view></el-main>
			</el-container>
		</el-container>
</template>

<script>
	export default{
		data() {
			return {
				
			}
		},
		methods:{
			//新闻管理点击事件
			showNews(){
				this.$router.push('/newsList')
			},
			//用户管理点击事件
			showUser(){
				this.$router.push('/userList')
			},
			toIndex(){
				this.$router.push('/')
			}
		}
	}
</script>

<style>
	.back-header {
		background-color: #55aaff;
		display: flex;
		line-height: 60px;
		justify-content: space-between;
		color: white;
	}
</style>